package com.eclipse.e0114_java8.作业Stream;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

public class Test {
	public static void main(String[] args) throws IOException {
		//读取文件内容 查看包含字符串a的 有几行
		List<String> list = Files.readAllLines(Paths.get("/Users/liuzhuangzhuang/test/a.txt"));
		long count = list.stream().filter(string -> string.contains("a")).count();
		System.out.println(count);
	}
	
}
